<template>
  <tooltip effect="dark" :content="enums" placement="bottom" trigger="click">
    <div>
      <el-button bg text>enum</el-button>
      <el-button text plain style="padding: 5px; margin-left: 5px">
        <el-icon><Warning /></el-icon>
      </el-button>
    </div>
  </tooltip>
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { Warning } from '@element-plus/icons-vue';
import Tooltip from './Tooltip.vue';

const props = defineProps<{
  types: string;
}>();

const enums = computed(() => {
  let arr = props.types.split(',');

  return arr.join(' | ');
});
</script>
